From 02ad65a0ca32ce4df7920e9b861148bb201e969b Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 7 Aug 2012 11:24:35 +0800 Subject: [PATCH] Backport r108702 from trunk --- lisp/ChangeLog | 4 ++++ lisp/mouse.el | 13 +++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6a1098e75dc..7ed254e93ec 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2012-08-07 Chong Yidong + + * mouse.el (mouse-drag-track): Deactivate the mark before popping. + 2012-08-06 Stefan Monnier * progmodes/cperl-mode.el (cperl-mode): Yet another fix for diff --git a/lisp/mouse.el b/lisp/mouse.el index d9511c722ca..53238f03524 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -885,10 +885,15 @@ DO-MOUSE-DRAG-REGION-POST-PROCESS should only be used by (copy-region-as-kill (mark) (point))))) ;; Otherwise, run binding of terminating up-event. - (cond - (do-multi-click (goto-char start-point)) - (moved-off-start (deactivate-mark)) - (t (pop-mark))) + (setq foo (list (window-buffer (selected-window)) + (current-buffer))) + + (if do-multi-click + (goto-char start-point) + (deactivate-mark) + (unless moved-off-start + (pop-mark))) + (when (and (functionp fun) (= start-hscroll (window-hscroll start-window)) ;; Don't run the up-event handler if the window -- 2.30.2